using System;
using XmlStudio.Enums;

namespace XmlStudio.Models.Events {
    /// <summary>
    /// Event arguments for ElementAdded event.
    /// </summary>
    public class NodeAddedEventArgs<TNode> : EventArgs {
        /// <summary>
        /// Gets or sets the parent.
        /// </summary>
        /// <value>The parent.</value>
        public TNode Parent { get; private set; }

        /// <summary>
        /// Gets or sets the added node.
        /// </summary>
        /// <value>The added node.</value>
        public TNode AddedNode { get; private set; }

        /// <summary>
        /// Gets or sets the reference node.
        /// </summary>
        /// <value>The reference node.</value>
        public TNode ReferenceNode { get; private set; }

        /// <summary>
        /// Gets or sets the insert mode.
        /// </summary>
        /// <value>The insert mode.</value>
        public InsertMode InsertMode { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="NodeAddedEventArgs&lt;TNode&gt;"/> class.
        /// </summary>
        /// <param name="parent">The parent.</param>
        /// <param name="addedNode">The added node.</param>
        /// <param name="insertMode">The insert mode.</param>
        /// <param name="referenceNode">The reference node.</param>
        public NodeAddedEventArgs(TNode parent, TNode addedNode, InsertMode insertMode, TNode referenceNode) {
            this.Parent = parent;
            this.AddedNode = addedNode;
            this.InsertMode = insertMode;
            this.ReferenceNode = referenceNode;
        }
    }
}